package sys

import (
	"github.com/gin-gonic/gin"
	"handitem/xxb-gin-web/commons/response"
)

type SysMenuApi struct{}

// 查询分类菜单
func (e *SysMenuApi) FindMenus(c *gin.Context) {
	sysMenus, err := sysMenuService.FindMenus()
	if err != nil {
		response.FailWithMessage("获取失败", c)
		return
	}
	response.Ok(sysMenuService.Tree(sysMenus, 0), c)
}
